<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'event-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>
    <div class="row">
	<?php echo CHtml::activeLabelEx($model,'time'); ?>
	<?php $this->widget('zii.widgets.jui.CJuiDatePicker',
		array(
			'name'=>'Event[time]',
			'options' => array('dateFormat'=>Yii::app()->locale->getDateFormat('medium')),
            //'timeFormat'=>'yy-mm-dd',
			'htmlOptions' => array('readonly'=>"readonly")
		)
	); ?>
    </div>
 
    <?php echo $form->error($model,'time'); ?>

	<!--<div class="row">
		<?php //echo $form->labelEx($model,'time'); ?>
		<?php //echo $form->textField($model,'time'); ?>
		<?php //echo $form->error($model,'time'); ?>
	</div>-->

	<div class="row">
		<?php echo $form->labelEx($model,'place'); ?>
		<?php echo $form->textField($model,'place',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'place'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'id_type'); ?>
		<?php echo $form->dropDownList($model,'id_type',$model->getTypeEvent()); ?>
		<?php echo $form->error($model,'id_type'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->